import request from "@/utils/request";
import { param } from "../../utils";

// 查询【公海线索列表】列表
export function listPublicClue(params) {
  return request({
    url: "/clue/admin/selectPagePublicClue",
    method: "get",
    params,
  });
}

// 新增公海线索
export function addClue(data) {
  return request({
    url: "/clue/admin/saveClue",
    method: "post",
    data,
  });
}

// 跟进线索id查用户信息
export function getClueIdToUserInfo(params) {
  return request({
    url: "/user/admin/getUserByClueId",
    method: "get",
    params,
  });
}

// 获取用户发布信息
export function getFindCarInfo(params) {
  return request({
    url: "/car/demand/admin/getUserCarDemand",
    method: "get",
    params,
  });
}

// 跟进用户手机号查询成交列表
export function getConsultancyInfo(params) {
  return request({
    url: "/clue/admin/selectCompleteUserClue",
    method: "get",
    params,
  });
}

// 跟进用户手机号查询咨询列表
export function getClueInfo(params) {
  return request({
    url: "/clue/admin/getUserClueByUserPhone",
    method: "get",
    params,
  });
}

// 查询线索详情
export function getClueLibraryDetail(params) {
  return request({
    url: "/clue/admin/getClueDetail",
    method: "get",
    params,
  });
}

// 提交跟进报价记录
export function submitClueOffer(data) {
  return request({
    url: "/clue/admin/submitClueOffer",
    method: "post",
    data,
  });
}

// 找车报价列表
export function carFindQuotes(params) {
  return request({
    url: "/car/demand/admin/getQuote",
    method: "get",
    params,
  });
}

// 找车联系列表
export function carFindCallLogs(params) {
  return request({
    url: "/car/demand/admin/getCallLog",
    method: "get",
    params,
  });
}

// 修改线索
export function submitUpdateClue(data) {
  return request({
    url: "/clue/admin/updateClue",
    method: "post",
    data,
  });
}

// 获取销售人员姓名
export function getMarketList(params) {
  return request({
    url: "/user/admin/getMarketPersonnel",
    method: "get",
    params,
  });
}

// 分配
export function manualDistribution(data) {
  return request({
    url: "/clue/admin/manualDistribution",
    method: "post",
    data,
  });
}

// 导入
export function importClueList(data) {
  return request({
    url: "/clue/admin/batchImportClue",
    method: "post",
    data,
  });
}
